package com.manlu.controller;

import com.manlu.pojo.Admin;
import com.manlu.service.AdminService;
import com.manlu.vo.BaseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Auther 漫路h
 * Created by 2020-05-04 20:49
 */
@RestController
@RequestMapping("/admin")
public class AdminController {
    @Resource
    private AdminService adminService;

    /**
     * 管理员登录
     * @param admin
     * @return
     */
    @PostMapping("/login")
    public BaseResult login(@RequestBody Admin admin){
        return adminService.login(admin);
    }


}
